<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="c-pid" class="control-label col-xs-12 col-sm-2">{:__('Plateid')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[plateid]">
                <option  value="">请选择</option>
                {foreach name="parentList" item="vo"}
                <option  value="{$key}" {in name="key" value="$row.plateid"}selected{/in}>{$vo.platename}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Postname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-postname" class="form-control" name="row[postname]" type="text" value="{$row.postname|htmlentities}">
        </div>
    </div>


    <!--帖子内容图-->
    <div class="form-group">
        <label for="c-file_img" class="control-label col-xs-12 col-sm-2">{:__('帖子内容图')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file_img" data-rule="" class="form-control hidden" size="50" name="row[file_img]" type="text" value="{$row.file_img|htmlentities}">
                <div class="input-group-addon no-border no-padding" style="display: table;">
                    <span>
                        <button type="button"
                                data-url="upload_file/uploadOBS"
                                id="plupload-file_img"
                                class="btn btn-danger plupload"
                                data-input-id="c-file_img"
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                                data-multiple="true"
                                data-preview-id="p-file_img">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
                    <span>
                        <button type="button"
                                id="fachoose-file_img"
                                class="btn btn-primary fachoose"
                                data-input-id="c-file_img"
                                data-mimetype="image/*"
                                data-multiple="true">
                        <i class="fa fa-list"></i> {:__('Choose')}
                        </button>
                    </span>
                </div>
                <span class="msg-box n-right" for="c-file_img"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-file_img"></ul>
        </div>
    </div>
    <!--帖子视频-->
    <div class="form-group">
        <!-- 切片上传组件 -->
        {include file="common/slicesUpload" title='帖子视频' fileInput_id='fileInput_video' name='row[file_video]' input_value='$row.file_video' url_arr='$row.file_video_url'/}
    </div>

    <!--帖子音频-->
    <div class="form-group">
        <!-- 切片上传组件 -->
        {include file="common/slicesUpload" title='帖子音频' fileInput_id='fileInput_audio' name='row[file_audio]' input_value='$row.file_audio' url_arr='$row.file_audio_url'/}
    </div>

    <!--帖子文件-->
    <div class="form-group">
        <!-- 切片上传组件 -->
        {include file="common/slicesUpload" title='帖子文件' fileInput_id='fileInput_data' name='row[file_data]' input_value='$row.file_data' url_arr='$row.file_data_url'/}
    </div>


<!--    <div class="form-group">-->
<!--        <label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-image" data-rule="" class="form-control" size="50" name="row[file]" type="text" value="{$row.file|htmlentities}">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span>-->
<!--                        <button type="button"-->
<!--                                data-url="upload_file/uploadOBS"-->
<!--                                id="plupload-image"-->
<!--                                class="btn btn-danger plupload"-->
<!--                                data-input-id="c-image"-->
<!--                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"-->
<!--                                data-multiple="false"-->
<!--                                data-preview-id="p-image">-->
<!--                            <i class="fa fa-upload"></i> {:__('Upload')}-->
<!--                        </button>-->
<!--                    </span>-->
<!--                    <span>-->
<!--                        <button type="button"-->
<!--                                id="fachoose-image"-->
<!--                                class="btn btn-primary fachoose"-->
<!--                                data-input-id="c-image"-->
<!--                                data-mimetype="image/*"-->
<!--                                data-multiple="false">-->
<!--                        <i class="fa fa-list"></i> {:__('Choose')}-->
<!--                        </button>-->
<!--                    </span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-image"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline plupload-preview" id="p-image"></ul>-->
<!--        </div>-->
<!--</div>-->
    <!--附件上传-->
    <div class="form-group">
        <!-- 切片上传组件 -->
        {include file="common/slicesUpload" title='附件链接' fileInput_id='fileInput_accessory' name='row[accessory]' input_value='$row.accessory' url_arr='$row.accessory_url'/}
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Postcontent')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-postcontent" class="form-control editor" rows="5" name="row[postcontent]" cols="50">{$row.postcontent|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-username" class="form-control" name="row[username]" type="text" value="{$row.username|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Plateid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-plateid" class="form-control" name="row[plateid]" type="number" value="{$row.plateid|htmlentities}">
        </div>
    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('View')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-view" class="form-control" name="row[view]" type="text" value="{$row.view|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lock')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lock" class="form-control" name="row[lock]" type="text" value="{$row.lock|htmlentities}">
        </div>
    </div>-->
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Top')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-top" class="form-control" name="row[top]" type="text" value="{$row.top|htmlentities}">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_jing')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_jing]', ['1'=>__('Yes'), '0'=>__('No')],$row.is_jing)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Top')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[top]', ['1'=>__('Yes'), '0'=>__('No')],$row.top)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_audit')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_audit]', ['1'=>__('Yes'), '0'=>__('No')],$row.is_audit)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lock')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[lock]', ['1'=>__('Yes'), '0'=>__('No')],$row.lock)}
        </div>
    </div>

    <!--是否在侧边栏展示-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否在侧边栏展示')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_sidebar]', ['1'=>__('Yes'), '0'=>__('No')],$row.is_sidebar)}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Replytime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-replytime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[replytime]" type="text" value="{$row.replytime}">
        </div>
    </div>
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Appid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-appid" class="form-control" name="row[appid]" type="number" value="{$row.appid|htmlentities}">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Creat_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-creat_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[creat_time]" type="text" value="{$row.creat_time}">
        </div>
    </div>


    <!--    会员价格-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_price" class="form-control" name="row[membership_price]" type="number" step="any" min="0" data-rule="required;range(0~)" value="{$row.membership_price|htmlentities}">
        </div>
    </div>
    <!--    会员时长-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_duration')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_duration" class="form-control" name="row[membership_duration]" type="number" step="1" min="0" data-rule="required;digits;integer;range(0~)" value="{$row.membership_duration|htmlentities}">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
